int run() {
	int x <- read();
	while (x <> 1) {
		write(x);
		if (x mod 2 = 0)
			x <- x / 2;
		else
			x <- 3 * x + 1;
	}
	write(x);
}
